<template>
  <div class="DecRoot">
    <el-card class="box-card">
      <el-button @click="saveAboutUs">保存</el-button>
      <div class="titlebOXSA">关于我们</div>
      <ckeditor4 :data.sync="value"></ckeditor4>
    </el-card>
  </div>
</template>

<script>
import ckeditor4 from "@/components/ckeditor4";
import {
  getHelpList,
  addHelpContent,
  editHelpContent,
  selectAboutUs,
  saveAboutUs,
} from "@/api/helpCenterApi.js";
export default {
  components: { ckeditor4 },
  name: "aboutUs",
  data() {
    return {
      form: {
        name: "关于我们",
        value: "",
      },
      value: "",
    };
  },
  created() {
    this.selectAboutUs();
  },
  methods: {
    //获取关于我们信心
    selectAboutUs() {
      selectAboutUs().then((data) => {
        this.value = data.data.value;
      });
    },
    saveAboutUs() {
      console.log(this.value);
      saveAboutUs({
        value: this.value,
      }).then((data) => {
        if (data.code == 200) {
          this.$message({
            type: "success",
            message: "操作成功",
          });
          this.selectAboutUs();
        }
      });
    },
  },
};
</script>

      <style scoped lang="scss">
/deep/ .el-card__body {
  min-height: 85vh;
}
.btnBox {
  display: flex;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px 0;

  .btnImg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
  }
}

.DecRoot {
  padding: 20px;
  padding-left: 5px;
  padding-bottom: 0;

  .newCard {
    height: 75vh;
    margin-top: 20px;
  }

  /deep/ .el-button {
    padding: 9px 15px;
  }

  .el-card {
    .headerBox {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .leftBox {
        display: flex;
        align-items: center;
        font-size: 18px;
        font-weight: 700;

        /deep/ .el-form-item {
          margin-bottom: 0;
        }

        /deep/ .el-input--suffix {
          width: 200px;
        }
      }
    }

    /deep/ .tableHeader {
      background: #edf3ff;
      font-weight: 700;
      color: #666666;
    }

    .iconImg {
      width: 20px;
      height: 20px;
      cursor: pointer;
      margin-right: 10px;
    }

    .pagination {
      display: flex;
      justify-content: space-between;
      margin-top: 10px;

      /deep/ .el-pagination__editor.el-input .el-input__inner {
        height: 28px !important;
      }

      /deep/ .el-input--mini .el-input__inner {
        height: 28px !important;
      }
    }
  }
}
</style>
    <style scoped lang="scss">
.titlebOXSA {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}
.newDialog {
  /deep/ .el-divider {
    margin: 0px;
  }
  /deep/ .el-dialog__header {
    padding: 0;
  }
  /deep/ .el-form-item__content {
    width: 75%;
  }
  /deep/ .el-select {
    width: 100%;
  }
  /deep/ .tableHeader {
    background: #edf3ff;
    font-weight: 700;
    color: #666666;
    padding: 5px 0;
  }
  .btnBox {
    display: flex;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    .btnImg {
      width: 14px;
      height: 14px;
      vertical-align: middle;
    }
    /deep/ .el-button {
      padding: 10px 20px;
    }
  }
  .DiaLogHeader {
    display: flex;
    padding: 10px 20px;
    justify-content: space-between;
    .titlebOX {
      font-size: 16px;
      font-weight: 700;
    }
    .chahao {
      width: 20px;
      height: 20px;
      background-image: url("@/assets/image/icon/chahao.png");
      background-size: 100% 100%;
      text-align: center;
      line-height: 20px;
      color: #e65f00;
      cursor: pointer;
    }
  }
  /deep/ .el-input {
    width: 100% !important;
  }
}
/deep/ .el-dialog__header {
  font-weight: 700;
}
/deep/ .demo-ruleForm {
  padding: 10px;
}

/deep/ .el-form-item {
  margin-bottom: 8px;
}
/deep/ .el-form-item__error {
  z-index: 99;
}
/deep/ .el-dialog__body {
  padding: 0;
  padding-top: 10px;
  padding-bottom: 60px;
}
.dialogTextBox {
  font-size: 14px;
  color: #000000;
}
</style>
